<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./layui-v2.7.6/layui/css/layui.css">
    <title>飞机大战</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        /* 原子类 */
        .p10 {
            padding: 10px;
        }

        .pf {
            position: fixed;
        }

        .hide {
            display: none !important;
        }

        body {
            background-image: url(./img/home-bg.png);
            background-size: cover;
            user-select: none;
        }

        .score {
            position: relative;
            z-index: 9999;
        }

        .myplane {
            position: fixed;
            cursor: pointer;
            user-select: none;
            -webkit-user-drag: none
        }

        .panel {
            display: flex;
            justify-content: space-around;
            flex-direction: column;
        }
        .layui-btn {
            position: fixed;
            top: 50%;
            left: 50%;
            z-index: 999999;
            transform: translate(-50%, -50%);
        }

        /* 自定义其他任意主题  */
        .class-layer-demo-custom .layui-layer-title {
            border-bottom: 1px solid #666;
            text-align: center;
            padding: 0;
            font-size: 18px;
            font-weight: bold;
        }

        .class-layer-demo-custom .layui-layer-btn {
            padding: 5px 10px 10px;
        }

        .class-layer-demo-custom .layui-layer-btn a {
            background: #fff;
            border-color: #E9E7E7;
            color: #333;
        }
        .class-layer-demo-custom .layui-layer-btn-{
            text-align: center;
        }
        .class-layer-demo-custom .layui-layer-btn .layui-layer-btn0 {
            border-color: #009688;
            background-color: #009688;
            color: #fff;
        }
    </style>
</head>

<body>
    <button class="layui-btn" id="startBtn">开始游戏</button>
    <p class="p10 score">分数: <span id="score1Dom">0</span> </p>
    <div class="game">
        <div id="ballDom" class="ball"></div>
        <div id="enemyDom" class="enemy"></div>
        <img id="myPlaneDom" class="myplane" src="./img/my-plane.gif" alt="">
    </div>
    <div class="panel hide" id="panelDom">
        <h1>飞机大战分数</h1>
        <p id="score2Dom">0</p>
        <div id="replayBtn">重新开始</div>
    </div>
    <script src="./layui-v2.7.6/layui/layui.js"></script>
    <script>
        const $ = layui.$;
    </script>
    <script src="./js/cfg.js"></script>
    <script src="./js/index.js"></script>
</body>

</html>